﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Charades.Web.Helpers
{
	public static class RandomNameHelper
	{
		private const string Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
		private static readonly Random Random = new Random();

		public static string GetName()
		{
			return GetName(8);
		}

		public static string GetName(int length)
		{
			return new string(Enumerable.Repeat(Chars, length).Select(s => s[Random.Next(s.Length)]).ToArray());
		}
	}
}